﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FontManager
{
    public class CustomDataGridViewCell : DataGridViewImageCell
    {
        /// <summary>
        /// CellSource lets us know what kind of value if showed at the cell AND switch back and forth between them when want to check if dummy image
        /// looks the same as XML file image.
        /// </summary>
        public enum CellSource
        {
            Dummy,
            XML
        }

        /// <summary>
        /// XML image
        /// </summary>
        public object XmlImage { get; set; }
        /// <summary>
        /// dummy image
        /// </summary>
        public object DummyImage { get; set; }
        /// <summary>
        /// which source will be showed on the screen
        /// </summary>
        public CellSource GetCellSource { get; set; }

        /// <summary>
        /// due to having the same piece of code in more than one place extracted it here.
        /// </summary>
        public CustomDataGridViewCell()
        {
            DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle();
            dataGridViewCellStyle.NullValue = null;
            dataGridViewCellStyle.Tag = "BLANK";
            this.Style = dataGridViewCellStyle;
        }
    }
}
